﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DesignPatternDemoCApp.Creational.BuilderPattern
{
    /// <summary>
    /// 抽象建造者，它定义了要创建什么部件和最后创建的结果，但不是组装的的类型，切记
    /// </summary>
    public abstract class Builder
    {
        /// <summary>
        /// 创建车门
        /// </summary>
        public abstract void BuildCarDoor();

        /// <summary>
        /// 创建车轮
        /// </summary>
        public abstract void BuildCarWheel();

        /// <summary>
        /// 创建车引擎
        /// </summary>
        public abstract void BuildCarEngine();
        // 当然还有部件，大灯、方向盘等，这里就省略了

        /// <summary>
        /// 获得组装好的汽车
        /// </summary>
        /// <returns></returns>
        public abstract Car GetCar();
    }
}
